.m-tooltip {
  position: relative;
  display: inline-block;
}
.m-tooltip::after {
  display: none;
  content: attr(data-content);
  position: absolute;
  padding: 5px 11px;
  max-width: 500px;
  border-radius: 4px;
  background: var(--m-overlay-color);
  color: var(--m-bg-color);
  overflow-wrap: break-word;
}
.m-tooltip::before {
  display: none;
  content: "";
  position: absolute;
  border: 5px solid transparent;
}
.m-tooltip:hover::before,
.m-tooltip:hover::after {
  display: block;
}
.m-tooltip:not([data-placement])::after {
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translate(-50%, 0);
}
.m-tooltip:not([data-placement])::before {
  bottom: calc(100%);
  left: 50%;
  transform: translate(-50%, 0);
  border-top-color: var(--m-overlay-color);
}
.m-tooltip[data-placement="top"]::after {
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translate(-50%, 0);
}
.m-tooltip[data-placement="top"]::before {
  bottom: calc(100%);
  left: 50%;
  transform: translate(-50%, 0);
  border-top-color: var(--m-overlay-color);
}
.m-tooltip[data-placement="bottom"]::after {
  top: calc(100% + 10px);
  left: 50%;
  transform: translate(-50%, 0);
}
.m-tooltip[data-placement="bottom"]::before {
  top: calc(100%);
  left: 50%;
  transform: translate(-50%, 0);
  border-bottom-color: var(--m-overlay-color);
}
.m-tooltip[data-placement="left"]::after {
  right: calc(100% + 10px);
  top: 50%;
  transform: translate(0, -50%);
}
.m-tooltip[data-placement="left"]::before {
  right: calc(100%);
  top: 50%;
  transform: translate(0, -50%);
  border-left-color: var(--m-overlay-color);
}
.m-tooltip[data-placement="right"]::after {
  left: calc(100% + 10px);
  top: 50%;
  transform: translate(0, -50%);
}
.m-tooltip[data-placement="right"]::before {
  left: calc(100%);
  top: 50%;
  transform: translate(0, -50%);
  border-right-color: var(--m-overlay-color);
}
